{ "cells": [ { "cell_type": "markdown", "source": [ "# Sabrina Revisited\n", "## Analysis of the problem model\n", "\n", "Spellman´s Ltd is a company that produces two types of chilling soft drinks: A, and B. Both beverages use a semi-elaborate C, another expensive ingredient D and other ingredients that are not relevant for production planning.\n", "\n", "The selling price of drink A is 3€/liter and the selling price of drink B is 2€/liter.\n", "\n", "1 liter of drink A uses 3 grams of ingredient D. A liter of drink B uses 1 gram of ingredient D. There are only 3 grams of ingredient D available per day.\n", "\n", "The factory only has one mixer to elaborate both drink types and the semi-elaborate. It takes 1 hour to process a liter of drink A, 1 hour to process 1 liter of drink B, and 1 hour to process 1cl of semi-elaborate C. The mixer is available 6 hours per day.\n", "\n", "Drink A uses 2cl of semi-elaborate C and drink B uses 1cl of semi-elaborate C. The company has 3cl of semi-elaborate C plus the amount they decide to produce every day.\n", "\n", "The following problem model provides the optimal daily production:\n", "\n", "**Decision variables**:\n", "- $x_A$: Production of drink A in liters\n", "- $x_B$: Production of drink B in liters\n", "- $x_C$: Production of semi-elaborate C in centiliters\n", "\n", "$x_A, x_C, x_B \\in \\mathbb{R}$\n", "\n", "**Objective function**\n", "\n", "$\\max z = 3*x_A + 2*x_B$\n", "\n", "z is the profit in euros.\n", "\n", "**Constraints**\n", "\n", "- Availability of ingredient D in grams:\n", "\n", "$3*x_A + x_B \\leq 3$\n", "\n", "- Availability of mixer in hours:\n", "\n", "$x_A + x_B + x_C \\leq 6$\n", "\n", "- Availability of semi-elaborate C in centiliters:\n", "\n", "$2*x_A + x_B -x_C \\leq 3$\n", "\n", "- Logical constraint\n", "\n", "$ x_A, x_C, x_B \\geq 0$\n", "\n", "\n", "A solver provides the following solution:\n", "\n", "Optimal\n", "\n", "Total profit is 6.00 €\n", "\n", "The following table shows the decision variables:\n", "\n", "| j | Variables | Solution | Reduced cost | Objective Coefficient | Objective Lower bound | Objective Upper bound |\n", "|:--|:----------------------|---------:|-------------:|----------------------:|----------------------:|----------------------:|\n", "| A | Production A (Liters) | 0 | -3 | 3 | -inf | 6 |\n", "| B | Production B (Liters) | 3 | 0 | 2 | 1 | inf |\n", "| C | Production C (Liters) | 3 | 0 | 0 | -0 | 1.5 |\n", "\n", "The following table shows the constraints:\n", "\n", "| j | Constraint | Slack | Shadow Price | Right Hand Side | Min RHS | Max RHS |\n", "|--:|:----------------------------------------|------:|-------------:|----------------:|--------:|--------:|\n", "| 0 | Availability of ingredient D (Liters) | 0 | 2 | 3 | 0 | 4.5 |\n", "| 1 | Availability of mixer (hours) | 0 | 0 | 6 | 3 | inf |\n", "| 2 | Availability of semi-elaborate (Liters) | 3 | 0 | 3 | 0 | inf |\n", "\n", "Answer the following analysis questions:\n", "\n", "1. Operational problems in the mixer, like mechanical problems, could reduce the available mixer. Based on the provided solution, how is the company able to deal with this type of problem? Motivate your response\n", "\n", "The mixer is fully used (slack of 0 in the mixer constraint). A reduction of the availability of the mixer would lead to a reduction in the production of the drinks. The minimum Right-Hand-Side (RHS) indicates that the current optimal solution will remain in the same basic solution as long as the availability is greater than 3 hours. This means that the production of both products A and B will remain as long as the mixer is available for at least 3 hours. If the mixer is available for less than 3 hours, the optimal solution will no longer remain in the same basic solution. Therefore, the company can deal with this type of problem by ensuring that the mixer is available for at least 3 hours per day.\n", "\n", "2. The managers of the company want you to negotiate with a new supplier that could increase your daily supply of ingredient D. What would be your terms for negotiating with the new supplier, ensuring that the basic variables remain the same?\n", "\n", "The shadow price of the ingredient D constraint is 2. This means that the company is willing to pay up to 2€ for an additional gram of ingredient D. The maximum RHS of the ingredient D is 4.5 grams. Therefore, the company should negotiate with the new supplier to provide the additional ingredient D at a price lower than 2€ per gram, increasing the daily supply from 3 grams to 4.5 grams. This will ensure that the basic variables remain the same, and the company can increase its daily supply of ingredient D without affecting the optimal solution.\n", "\n", "3. The managers of the company would like to review the prices of both products. Analyse how changes in the prices of both products could affect the production plan and provide useful feedback to guide the revision of the prices\n", "\n", "First, with the current prices, the Production of product A is not profitable for the company (0 Liters). Since the reduced cost is -3 euros, the company should increase the price of product A to at least 6 euros per liter to make it profitable.\n", "\n", "Taking a look at product B, the production of product B is profitable for the company (3 Liters). The price could be increased without affecting the production plan. However, the company should be careful decreasing the price of product B, as the lower bound for the price per liter (objective function coefficient) is 1 euro.\n", "\n", "\n", "## Duality\n", "\n", "1. Write down the dual problem.\n", "\n", "The dual problem is the following:\n", "\n", "**Decision variables**:\n", "- $u_1$: Shadow price of the ingredient D constraint\n", "- $u_2$: Shadow price of the mixer constraint\n", "- $u_3$: Shadow price of the semi-elaborate C constraint\n", "\n", "\n", "**Objective function**\n", "$\\min z = 3*u_1 + 6*u_2 + 3*u_3$\n", "\n", "**Constraints**\n", "$3*u_1 + u_2 + 2*u_3 \\geq 3$\n", "\n", "$u_1 + u_2 + u_3 \\geq 2$\n", "\n", "$u_2 - u_3 \\geq 0$\n", "\n", "$u_1, u_2, u_3 \\geq 0$\n", "\n", "## Problem Extension\n", "1. Spellman's Ltd wants to evaluate the possibility of subcontracting part of the production of semi-elaborate C to an external provider, at a cost of 0.35€ per cl. With the new set-up, the daily availability of semi-elaborate C will be the sum of the semi-elaborate C produced at Spellman's plus the amount purchased from the new provider. What changes are needed in the problem to evaluate the subcontracting of semi-elaborate C? (1.5 points)\n", "\n", "\n", "\n", "**Decision variables**:\n", "We need to introduce a new decision variable:\n", "\n", "- $x_{C_{sub}}$: Amount of semi-elaborate C purchased from the new provider\n", "\n", "**Objective function**\n", "The objective function will also change to include the cost of purchasing the semi-elaborate C:\n", "\n", "$\\max z = 3*x_A + 2*x_B - 0.35*x_{C_{sub}}$\n", "\n", "**Constraints**\n", "The new constraint to evaluate the availability of semi-elaborate C will be:\n", "\n", "$2*x_A + x_B -x_C - x_{C_{sub}} \\leq 3$\n", "\n", "The availability of the mixer constraint will also change to include the production of the semi-elaborate C purchased from the new provider:\n", "\n", "$x_A + x_B + x_C + x_{C_{sub}} \\leq 6$\n", "\n", "And obviously, the logical constraint will also change to include the new decision variable:\n", "\n", "$ x_A, x_C, x_B, x_{C_{sub}} \\geq 0$\n" ], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }